<template>
<view>
		<scroll-view class="item_box" scroll-y="true" @scrolltolower='scrolltolower' v-if="lists.length>0">
			<view class="sun_box" v-for="(item,i) in lists" style="padding: 0 15rpx;">
				<view class="sun_text">
					<view class="" style="display: flex;align-items: center;">
						<view>
							<image :src="item.avatar" mode="aspectFill"
								style="width: 120rpx;height: 120rpx;border-radius: 50%;" v-if="item.avatar"></image>
								<image src="/static/logo.png" mode="aspectFill"
									style="width: 120rpx;height: 120rpx;border-radius: 50%;" v-else></image>
						</view>
						<view class="">
							<view style="margin-left: 20rpx;font-size: 35rpx;font-weight: 600;">{{item.name}}</view>
							<view class="sun_time" style="margin-left: 20rpx;margin-top: 10rpx;">{{item.phone}}</view>
						</view>
					</view>
				</view>
				<view class="" style="font-size: 28rpx;color: #999999;">
					<view>{{item.addtime}}</view>
				</view>
			</view>
			<view class="" style="height: 200rpx;"></view>
		</scroll-view>
		
		<view class="" v-else style="width: 750rpx;height: 100vh;display: flex;align-items: center;justify-content: center;">
			<u-empty
			        mode="list"
			        icon="http://cdn.uviewui.com/uview/empty/list.png"
			>
			</u-empty>
		</view>
		<view class="bottom_box">
			<view style="margin-left: 20rpx;font-size: 35rpx;font-weight: 600;">
				邀请社工:{{peopleNum}}人
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				lists: [],
				peopleNum:0

			}
		},
		onShow() {
			this.list()
		},
		methods: {
			async list() {
				let res = await this.$request("kehu/user/inviteWorkerList",{},'get')
				console.log(res)
				// this.lists = res.data.data
				this.lists = res.data.data.list
				this.peopleNum = res.data.data.peopleNum
			},
		}
	}
</script>

<style scoped>
	.bottom_box {
		width: 750rpx;
		background-color: #fff;
		padding-top: 20rpx;
		padding-bottom: 20rpx;
		position: fixed;
		bottom: 0%;
		background-color: #fff;
		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
	}
	.Text1 {
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #fff;
		margin-right: 5rpx;
	}
	
	.rightIcon {
		width: 10rpx;
		height: 19rpx;
	}
	
	.btnBox {
		margin-left: auto;
		display: flex;
		align-items: center;
		position: absolute;
		right: 3%;
		top: 14%;
	}
	
	.tixian {
		color: #E87B83;
		font-size: 32rpx;
		text-align: right;
		padding-right: 30rpx;
		margin-top: 15rpx;
	}
	
	.sun_jifen {
		color: #0D62F1;
		font-size: 40rpx;
	}
	
	.sun_box {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		
		margin-bottom: 50rpx;
	}
	
	.index_title {
		padding-left: 30rpx;
		font-size: 34rpx;
		margin-top: 10rpx;
		font-weight: bold;
		position: relative;
		margin-bottom: 30rpx;
		margin-top: 20rpx;
	}
	
	.sun_title {
		width: 550rpx;
		font-size: 34rpx;
		font-weight: 600;
	}
	
	.sun_time {
		font-size: 28rpx;
		color: #999999;
		margin-top: 26rpx;
	}
	
	
	.index_dian {
		width: 140rpx;
		height: 13rpx;
		background-color: #fe471e;
		border-radius: 7rpx;
		position: absolute;
		bottom: 0rpx;
		opacity: 0.7;
	}
	
	page {
		background-color: #F5F5F5;
	}
	
	.item_box {
		background-color: #fff;
		height: 1128rpx;
		border-radius: 10rpx;
		margin-top: 20rpx;
	}
	
	.top_box {
		height: 225rpx;
		background-color: #fe471e;
		border-radius: 10rpx;
		margin-left: 20rpx;
		margin-top: 40rpx;
		display: flex;
		justify-content: space-between;
	}
	
	.top_text {
		color: #fff;
		font-size: 32rpx;
		text-align: center;
		width: 200rpx;
		margin-left: 20rpx;
		padding-top: 50rpx;
	}
	
	.top_jifen {
		font-size: 60rpx;
		font-weight: 600;
		margin-top: 25rpx;
	}
</style>